// pages/viewmore/viewmore.js
Page({
  data:{

  },
  onLoad: function (options) {

    this.setData({
      title: options.title
    })
    // 从缓存里拿出数据
    let str = null
    switch(options.title){
      case '影院热映':
        str = 'inTheatersData'
        break;
      case '豆瓣新片':
        str = 'newMoviesData'
        break;
      case '即将上映':
        str = 'comingSoon'
        break;
      case 'Top250':
        str = 'top250'
        break;
    }
    wx.getStorage({
      key: 'movies',
      success: (res)=> { 
        this.setData({
          obj:res.data[str]
        })
      },
    })
  }
})